package cn.keepme.ep.common.event.listner;

import java.util.concurrent.ExecutorService;
import java.util.concurrent.Executors;

import javax.jms.Message;
import javax.jms.MessageListener;
import javax.jms.ObjectMessage;

import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
import org.jweb.common.activeMQ.listener.MsgListener;

/**
 * 从activeMQ消息队列读取系统事件并通过事件派发线程将事件派发出去
 * @author Administrator
 *
 */

public class ActiveMQResponseListener implements MessageListener {
	private static Log log = LogFactory.getLog(MsgListener.class);
	
	
	ExecutorService executorService = Executors.newFixedThreadPool(50);// 线程池执行器

	@Override
	public void onMessage(final Message message) {
		if (message instanceof ObjectMessage) {

			ObjectMessage objectMessage = (ObjectMessage) message;
			System.out.println(objectMessage.toString());
		}

	}

	
}